import React, {Component} from 'react';

export default class ItemUser extends Component {
    render() {
        const {resourcename, resourceid, senderid, sendername} = this.props;

        let hrmid = resourceid;
        let hrmname = resourcename;
        if (senderid != '' && sendername != '') {
            hrmid = senderid;
            hrmname = resourcename;
        }

        return (
            <div className="common sysfav-list-item-info-user" ecId={`${this && this.props && this.props.ecId || ''}`}>
                <a
                    href={`javaScript:openhrm(${hrmid});`}
                    onClick={window.pointerXY}
                    title={hrmname}
                >{hrmname}
                </a>
            </div>
        );
    }
}
